#include "widget.h"
#include "ui_widget.h"
#include "thread"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->lcdNumber->display(10);
    std::thread p([=](){
        int value = ui->lcdNumber->intValue();
        while(value > 0){
            std::this_thread::sleep_for(std::chrono::seconds(1));
            ui->lcdNumber->display(--value);
        }
    });
}

Widget::~Widget()
{
    delete ui;
}

